package com.aspose.cells;

import java.util.ArrayList;

class zadu {
   private zaeh a = null;

   zadu(zaeh var1) {
      this.a = var1;
   }

   void a(zafg var1, String var2, String var3, String var4, String var5) throws Exception {
      StreamProviderOptions var6 = new StreamProviderOptions();
      zafg var7 = this.a.c(var1, var2, var3, var4, var5, var6);
      ArrayList var8 = this.a();

      try {
         var7.a((String)var8.get(0));

         for(int var9 = 1; var9 < var8.size(); ++var9) {
            String var10 = (String)var8.get(var9);
            var7.b(var10);
         }

         var7.h();
         this.a.u.closeStream(var6);
      } finally {
         ;
      }
   }

   private ArrayList a() {
      ArrayList var1 = new ArrayList();
      com.aspose.cells.b.a.a.ze.a(var1, (Object)"<xml xmlns:o=\"urn:schemas-microsoft-com:office:office\">");
      com.aspose.cells.b.a.a.ze.a(var1, (Object)(" <o:MainFile HRef=\"../" + this.a.j + "\"/>"));
      com.aspose.cells.b.a.a.ze.a(var1, (Object)" <o:File HRef=\"editdata.mso\"/>");
      String var2 = (String)this.a.v.get("filelist.xml");
      String var3 = (String)this.a.v.get("stylesheet.css");
      String var4 = (String)this.a.v.get("tabstrip.htm");
      if (var3 != null && this.a.c().isFullPathLink()) {
         com.aspose.cells.b.a.a.ze.a(var1, (Object)(" <o:File HRef=\"" + var3 + "\"/>"));
      } else {
         com.aspose.cells.b.a.a.ze.a(var1, (Object)" <o:File HRef=\"stylesheet.css\"/>");
      }

      if (var4 != null && this.a.c().isFullPathLink()) {
         com.aspose.cells.b.a.a.ze.a(var1, (Object)(" <o:File HRef=\"" + var4 + "\"/>"));
      } else {
         com.aspose.cells.b.a.a.ze.a(var1, (Object)" <o:File HRef=\"tabstrip.htm\"/>");
      }

      for(int var5 = 0; var5 < this.a.r.size(); ++var5) {
         String var6 = "sheet" + zaff.a(var5 + 1, 3) + ".htm";
         String var7 = (String)this.a.v.get(var6);
         if (var7 != null && this.a.c().isFullPathLink()) {
            com.aspose.cells.b.a.a.ze.a(var1, (Object)(" <o:File HRef=\"" + var7 + "\"/>"));
         } else {
            com.aspose.cells.b.a.a.ze.a(var1, (Object)(" <o:File HRef=\"" + var6 + "\"/>"));
         }
      }

      if (var2 != null && this.a.c().isFullPathLink()) {
         com.aspose.cells.b.a.a.ze.a(var1, (Object)(" <o:File HRef=\"" + var2 + "\"/>"));
      } else {
         com.aspose.cells.b.a.a.ze.a(var1, (Object)" <o:File HRef=\"filelist.xml\"/>");
      }

      com.aspose.cells.b.a.a.ze.a(var1, (Object)"</xml>");
      return var1;
   }
}
